<tpl var layoutBody={ />
<div data-identity="sys:resource" data-table="sys_resource">
	<div class="layui-breadcrumb">
		<a href="/manage/index.jspx">首页</a>
		<a href="/manage/sys/resource/index.jspx">资源管理</a>
		<a href="javascript:;">
			<cite>修改</cite>
		</a>
	</div>
	<hr>
	<fieldset class="layui-elem-field">
		<legend>修改 资源管理</legend>
		<div class="layui-field-box">
			<form class="layui-form" action="save.json?oper=update" lay-filter="mSysResourceForm">
				<div class="layui-form-item" data-type="int" data-isnull="NO" data-name="id">
					<label class="layui-form-label">资源ID：</label>
					<div class="layui-input-block">
						<input type="text" name="id" placeholder="请输入资源ID" autocomplete="off" class="layui-input" value="${record.id!}" readonly>
					</div>
				</div>
				<div class="layui-form-item" data-type="int" data-isnull="NO" data-name="pid">
					<label class="layui-form-label">上级资源：</label>
					<div class="layui-input-block">
						<input type="text" name="pid" placeholder="请输入上级资源" autocomplete="off" class="layui-input" value="${record.pid!}">
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="NO" data-name="name">
					<label class="layui-form-label">资源名称：</label>
					<div class="layui-input-block">
						<input type="text" name="name" placeholder="请输入资源名称" autocomplete="off" class="layui-input" value="${record.name!}">
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="YES" data-name="icon">
					<label class="layui-form-label">资源图标：</label>
					<div class="layui-input-block">
						<input type="text" name="icon" placeholder="请输入图标" autocomplete="off" class="layui-input" value="${record.icon!}">
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="mSysResourceForm">立即提交</button>
					</div>
				</div>
			</form>
		</div>
	</fieldset>
</div>
<tpl }; />

<tpl var layoutScript={ />
<script>
	layui.use(['element', 'form'], function () {
		// 绑定表单提交事件
		layui.form.on('submit(mSysResourceForm)', function (data) {
			$.postLoading('save.json?oper=update', data.field, function (res) {
				layer.msg(res.message, {
					icon: 1,
					time: 1500
				}, function () {
					history.back();
				});
			});

			return false;
		});
	});
</script>
<tpl }; />
<tpl include( "../../tpl/layout-scroll.html",{identity: "sys:resource",layoutBody:layoutBody,layoutScript:layoutScript}){}/>